package com.ludum.game;

import com.ludum.game.map.Map;
import com.ludum.game.map.MapFactory;

public class LevelLoader {
	private static LevelLoader loader;
	
	//level counter
	int levelGunter;
	
	private LevelLoader() {
		levelGunter = 0;
	}
	
	public static LevelLoader getLoader(){
		if (loader == null){
			loader = new LevelLoader();
		}
		
		return loader;
	}
	
	public Map next() {
		Map clevel = getLevel();
		
		levelGunter++;
		
		return clevel;
	}
	
	private Map getLevel(){
		/* this should be a test on the value of levelGunter
		 * rather than true */
		if( true ){
			return MapFactory.getFactory().createTest();
		}
		
		return null;
	}
}
